package com.youzan.open.sdk.gen.v3_0_0.model;

import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
import com.youzan.open.sdk.model.APIParams;
import com.youzan.open.sdk.model.ByteWrapper;
import com.youzan.open.sdk.model.FileParams;
import java.util.List;
import java.util.Map;
import java.util.Date;

public class YouzanTradeCloseParams implements APIParams, FileParams  {

    /**
     * 关闭交易的原因
     */
    private String closeReason;
    /**
     * 关闭原因代码 10 => '无法联系上买家', 11 => '买家误拍或重拍了', 12 => '买家无诚意完成交易', 13 => '已通过银行线下汇款', 14 => '已通过同城见面交易', 15 => '已通过货到付款交易', 16 => '已通过网上银行直接汇款', 17 => '已经缺货无法交易'
     */
    private String closeReasonId;
    /**
     * 交易订单号
     */
    private String tid;

    public void setCloseReason(String closeReason) {
        this.closeReason = closeReason;
    }

    public String getCloseReason() {
        return this.closeReason;
    }

    public void setCloseReasonId(String closeReasonId) {
        this.closeReasonId = closeReasonId;
    }

    public String getCloseReasonId() {
        return this.closeReasonId;
    }

    public void setTid(String tid) {
        this.tid = tid;
    }

    public String getTid() {
        return this.tid;
    }


    public Map<String, Object> toParams() {
        Map<String, Object> params = Maps.newHashMap();
        if (closeReason != null) {
            params.put("close_reason", closeReason);
        }
        if (closeReasonId != null) {
            params.put("close_reason_id", closeReasonId);
        }
        if (tid != null) {
            params.put("tid", tid);
        }
        return params;
    }

    public Multimap<String, ByteWrapper> toFileParams() {
        Multimap<String, ByteWrapper> params = ArrayListMultimap.create();

            return params;
    }


}